#include "loginmodel.h"

LoginModel::LoginModel(QWidget *parent) : QWidget(parent)
{

}

void LoginModel::setModel(QSharedPointer<Data> dataPtr)
{
    QSharedPointer<LoginData> loginDataPtr = dataPtr.dynamicCast<LoginData>();
    this->m_role = loginDataPtr->getRole();
    this->m_account = loginDataPtr->getAccount();
    this->m_password = loginDataPtr->getPassword();
}

QSharedPointer<Data> LoginModel::getModelData()
{
    return QSharedPointer<LoginData>(new LoginData(m_account,m_password,m_role));
}

void LoginModel::init(){

}
